package com.chixing.day03_oop;


/*
* 该类表示的是:公司类
* 一类事物
* 封装了 所有公司的共有属性的方法
*
*
* 【访问修饰符】
* 属性用public修饰: 存在的问题
*  (1)若修改属性名，会出现其他很多地方要修改 可维护性很差
*  (2)元信息(meta)被暴露出来了,安全性低
*
*
*
* 解决方案:
* public ------> private
* public:由public 修饰的属性与方法，其他类都能访问
* private:由privat修饰的属性与方法，只能本类内部访问
*
** public:全局，能够在不同包之间访问
 * protected:只能够在本类和同一个包下访问，和不同包中的子类能够访问
 * 缺省：同一个包中的类可以访问
 * private :只能是当前类访问
* */
public class Company {
    //属性
  /*  public int companyId;
    public String companyName;
    public String companyAddress;
    public  String companyType;
    public Long companyTelno;*/


    private int companyId;
    private String companyName;
    private String companyAddress;
    private  String companyType;
    private Long companyTelno;



    //getter & setter
    //属性赋值
    public void setCompanyId(int id){

        this.companyId = id;   //company1.setCompanyId();
    }
    //属性取值
    public int getCompanyId(){
        return this.companyId;
    }
    //name
    public void setCompanyName(String name){
        this.companyName = name;   //companyName:this.companyName      this.companyName = name ="中国华为"
    }
    public String getCompanyName(){
        return this.companyName;
    }

    //address
    public void setCompanyAddress(String address){
        this.companyAddress = address;
    }
    public String getCompanyAddress(){
        return this.companyAddress;
    }

    //companyType
    public void setCompanyType(String type){
        this.companyType = type;
    }
    public String getCompanyType(){
        return this.companyType;
    }

    //companyTelno
    public void setCompanyTelno(long telno){
        this.companyTelno = telno;
    }
    public long getCompanyTelno(){
        return this.companyTelno;
    }


























    //方法
    //发布一个新岗位
    public void publishJob(){

    }
    //查看简历
    public void getResume(){

    }
}
